<form id="add-user-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input type="hidden" name="row[factory_id]" value="{$factory.id}">
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">选择用户:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-user_id" class="form-control selectpicker" name="row[user_id]" data-live-search="true" required>
                <option value="">请选择用户</option>
                {foreach name="userList" item="vo" key="key"}
                <option value="{$key}">{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">角色:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-role" class="form-control selectpicker" name="row[role]">
                {foreach name="roleList" item="vo" key="key"}
                <option value="{$key}" {in name="key" value="employee"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-status" class="form-control selectpicker" name="row[status]">
                <option value="1" selected>正常</option>
                <option value="0">禁用</option>
            </select>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
